package cn.cvs.demo;

import cn.cvs.utils.Single;
import org.apache.log4j.Logger;
import org.junit.Test;

public class Demo {
    private Logger logger = Logger.getLogger(Demo.class);
    @Test
    public void demo(){
        Single single = Single.test();
        logger.info("调用Singleton.test()方法获取实例FileNotFoundException对象: " + single);
        single = Single.getInstance();
        logger.info("第一次调用Singleton.getInstance()方法获取实例对象: " + single);
        single = Single.getInstance();
        logger.info("第二次调用Singleton.getInstance()方法获取实例对象: " + single);
    }
}
